/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package olympicgamesgui;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import olympicgameslogic.*;
/** 
 * 
 * 
 * @author 75
 
 *
 */

public class DialogAbout extends JDialog {
  
   private JTextField txtuser = new JTextField(15);
   private JPasswordField txtpass = new JPasswordField(15); 
   private Boolean trigger = false;
   private JLabel lblerro = new JLabel("");
   private AppUser ut;
   
   public DialogAbout (Frame owner, String titulo){
        super(owner, titulo, true);        
        ClassLoader cldr = this.getClass().getClassLoader();
        super.setIconImage(Toolkit.getDefaultToolkit().getImage(cldr.getResource("images/extra/icon.png"))); 
        setLayout(new BorderLayout());
        setBackground(Color.white);
        JPanel pannorte= new JPanel(new FlowLayout(FlowLayout.CENTER));
        pannorte.setSize(200,60); 
        pannorte.setBackground(Color.white);
        
        ImageIcon img = new ImageIcon(cldr.getResource("images/extra/topo_site.jpg"));
        JLabel backgound = new JLabel(img);
        pannorte.add(backgound);
        
        JPanel pancentro= new JPanel();
        pancentro.setBackground(Color.white);        
        pancentro.setLayout(new GridLayout(4, 1));
        
        JPanel p1 = new JPanel(new FlowLayout(FlowLayout.CENTER));        
        p1.add(new JLabel("Olympic Games Management v1 @Copyright")); 
        p1.setBackground(Color.white);  
        pancentro.add(p1);  
        
        JPanel p2 = new JPanel(new FlowLayout(FlowLayout.CENTER));  
        p2.add(new JLabel("ISEP/DEI - LAPR2 2011/2012 - Grupo 75"));               
        p2.setBackground(Color.white);  
        pancentro.add(p2); 
        
        JPanel p3 = new JPanel(new FlowLayout(FlowLayout.CENTER));
        JLabel l3 = new JLabel("Nuno Silva - 1960142; ");
        l3.setFont(new Font("Arial", Font.PLAIN, 14));
        p3.add(l3); 
        p3.setBackground(Color.white);                     
        pancentro.add(p3);
        
        p3 = new JPanel(new FlowLayout(FlowLayout.CENTER));
        l3 = new JLabel("Fábio Mendonça - 1081723");
        l3.setFont(new Font("Arial", Font.PLAIN, 14));
        p3.add(l3); 

        p3.setBackground(Color.white);                     
        pancentro.add(p3);
                       
        JPanel pansul= new JPanel();
        pansul.setSize(200,20);
        pansul.setBackground(Color.white);  
        JButton btok = new JButton("OK", new ImageIcon(cldr.getResource("images/extra/btok.png")));
        pansul.setLayout(new FlowLayout(FlowLayout.CENTER));                        
        pansul.add(btok);
        
        add(pannorte,BorderLayout.NORTH);
        add(pancentro,BorderLayout.CENTER);
        add(pansul,BorderLayout.SOUTH);        
        setSize(340,370);
        setResizable(false);
        setLocationRelativeTo(null);
        setVisible(true);                
        
      
        
	btok.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                dispose();
            }
        });
	      
}    

}
